@Repository
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th=
        "http://www.thymeleaf.org" lang="en">
<head th:replace="fragments/header :: head">
</head>
<body>
<div class="container">
    <h3 class="text-center">订单信息汇总</h3>
    <div class="alert alert-success" th:if="${successMessage}" th:utext=
            "${successMessage}"></div>
    <table class="table table-striped table-bordered text-center">
        <thead>
        <tr>
            <th>编号</th>
            <th>日期</th>
            <th>价格</th>
            <th>状态</th>
            <th>用户</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <tr th:if="${#lists.isEmpty(orders)}">
            <td colspan="7">订单为空</td>
        </tr>
        <th:block th:each="o : ${orders}">
            <tr th:switch="${o.orderStatus}">
                <td>[[${o.orderId}]]</td>
                <td>[[${o.orderDate}]]</td>
                <td>[[${o.orderPrice}]] 元 </td>
                <td th:case="true"><i class="fa fa-check" aria-hidden=
                        "true"></i></td>
                <td th:case="false"><i class="fa fa-clock-o" aria-hidden=
                        "true"></i></td>
                <td><a th:href="@{'/users/edit/{userId}'(userId=${o.user.userId})}">[[${o.user.userName}]]</a></td>
                <td>
                    <a class="btn btn-info" th:href=
                            "@{'/order/{orderId}'(orderId=${o.orderId})}">详情</a>
                    <a th:unless="${o.orderStatus}" class="btn btn-warning" th:href="@{'/orders/complete/{orderId}'(orderId=${o.orderId})}">完成 </a>
                    <a class="btn btn-danger" th:href=
                            "@{'/orders/delete/{orderId}'(orderId=${o.orderId})}">
                        删除</a>
                </td>
            </tr>
        </th:block>
        </tbody>
    </table>
</div>
</body>
</html>